

**************************************************************
******************** Replication code for ********************
****** "Conspiracy Thinking and Electoral Trust during" ******
******** Tumultuous Times:The Case of Israel", IJPOR *********
******* Omer Yair, Amnon CaVari, and Asif Efrat and  *********
**************************************************************


* Setting the working directory
*cd <<<"ADD DIRECTORY HERE">>>

cd "C:\Users\bronc\Desktop\"


* Upload the .dta dataset
use "CT_Etrust_dataset.dta", clear



********************************
** Analyses for the main text **
********************************


** Trust in elections descriptive statistics **
bysort survey_num: tab trust_election_results
recode trust_election_results (5=.)
bysort survey_num: tab trust_election_results

* Creating a 0-1 'Electoral trust' dependent variable
gen trust_election_results_01=(trust_election_results-1)/3
label var trust_election_results_01 "Electoral trust, varies 0-1"
sum trust_election_results trust_election_results_01

/* twoway (histogram CT_scale if survey_num==1, bin(15) fraction fcolor(blue%15)) ///
       (histogram CT_scale if survey_num==2, bin(15) fraction fcolor(red%15)) ///
	   (histogram CT_scale if survey_num==3, bin(15) fraction fcolor(gray%15)) ///
	   (histogram CT_scale if survey_num==4, bin(15) fraction fcolor(black%15) ///
	   xtitle(Conspiracy Thinking Scale) ) */


** Creating the voting groups/blocs, based on the March 2021 election
fre vote_21
gen voting_group=1 if vote_21==1 | vote_21==3 | vote_21==7 | vote_21==9 
replace voting_group=2 if vote_21==2 | (vote_21>=4 & vote_21<=6) | vote_21==8 | ///
						  (vote_21>=11 & vote_21<=13)  
replace voting_group=3 if vote_21==10
replace voting_group=4 if vote_21==14
replace voting_group=5 if vote_21==15 | vote_21==16
label var voting_group "Voting groups"
label define vote_group_lab 1 "The 'Netanyahu bloc'" 2 "The 'change bloc'" ///
							3 "Joint List" 4 "Other parties" 5 "Didn't vote/Don't know"
label values voting_group vote_group_lab
tab vote_21 voting_group, miss
tab voting_group

** Chaning the voting groups/blocs, based on the Nov. 2022 election
fre vote_22
replace voting_group=1 if vote_22==1 | vote_22==3 | vote_22==5 | vote_22==6
replace voting_group=2 if vote_22==2 | vote_22==4 | vote_22==7 | vote_22==8 | ///
						 vote_22==10 | vote_22==11 | vote_22==13 
replace voting_group=3 if vote_22==9 | vote_22==12
replace voting_group=4 if vote_22==14
replace voting_group=5 if vote_22==15 | vote_22==16 
tab vote_22 voting_group, miss
tab voting_group

* Religiosity, varies 0-1
gen religiosity_all_01=(religiosity_all-1)/3
label var religiosity_all_01 "Religiosity, varies 0-1"
sum religiosity_all_01



** Table 1 - description of the CT scale items
recode FEW_PEOPLE PEOPLE_RUN_UNKNOWN CABAL_AGAINST_PEOPLE CONSP_DETERMINE_LIVES (6=.)
tab1 FEW_PEOPLE PEOPLE_RUN_UNKNOWN CABAL_AGAINST_PEOPLE CONSP_DETERMINE_LIVES if survey_num==1
tab1 FEW_PEOPLE PEOPLE_RUN_UNKNOWN CABAL_AGAINST_PEOPLE CONSP_DETERMINE_LIVES if survey_num==2
tab1 FEW_PEOPLE PEOPLE_RUN_UNKNOWN CABAL_AGAINST_PEOPLE CONSP_DETERMINE_LIVES if survey_num==3
tab1 FEW_PEOPLE PEOPLE_RUN_UNKNOWN CABAL_AGAINST_PEOPLE CONSP_DETERMINE_LIVES if survey_num==4

bysort survey_num: sum CT_scale

** Table 2 - Regression table **
* Model 1 - April 2022
reg trust_election_results_01 CT_scale i.voting_group i.ideo_bloc i.age_group2 i.gender i.jewish i.college_educ religiosity_all_01 if survey_num==1, r
outreg2 using Table2.doc, replace se dec(2) alpha (.001, .01, .05) symbol (***, **, *)

* Model 2 - September 2022
reg trust_election_results_01 CT_scale i.voting_group i.ideo_bloc i.age_group2 i.gender i.jewish i.college_educ religiosity_all_01 if survey_num==2, r
outreg2 using Table2.doc, append se dec(2) alpha (.001, .01, .05) symbol (***, **, *)

* Model 3 - October 2022
reg trust_election_results_01 CT_scale i.voting_group i.ideo_bloc i.age_group2 i.gender i.jewish i.college_educ religiosity_all_01 if survey_num==3, r
outreg2 using Table2.doc, append se dec(2) alpha (.001, .01, .05) symbol (***, **, *)

* Model 4 - December 2022
reg trust_election_results_01 CT_scale i.voting_group i.ideo_bloc i.age_group2 i.gender i.jewish i.college_educ religiosity_all_01 if survey_num==4, r
outreg2 using Table2.doc, append se dec(2) alpha (.001, .01, .05) symbol (***, **, *)

* Model 5 - All four surveys combined
reg trust_election_results_01 CT_scale i.voting_group i.ideo_bloc i.age_group2 i.gender i.jewish i.college_educ religiosity_all_01 i.survey_num, r
outreg2 using Table2.doc, append se dec(2) alpha (.001, .01, .05) symbol (***, **, *)


**************
** Figure 1 **
**************

** Creating a 'winning group' categorical var. (lowest category is electoral winner)
gen winner_voting_groups=voting_group
replace winner_voting_groups=1 if voting_group==2 & survey_num==4
replace winner_voting_groups=2 if voting_group==1 & survey_num==4
label var winner_voting_groups "The winning 'group'"

xi: reg trust_election_results_01 CT_scale i.winner_voting_groups i.ideo_bloc i.age_group2 i.gender i.jewish i.college_educ religiosity_all_01, r

gen inter=_Iwinner_vo_2*CT_scale
gen inter2=_Iwinner_vo_3*CT_scale
gen inter3=_Iwinner_vo_4*CT_scale
gen inter4=_Iwinner_vo_5*CT_scale


** The pertinent regression coefs below were used to create Figure 1 **

* Model 1 - April 2022
reg trust_election_results_01 CT_scale _Iwinner_vo_2 inter inter2 inter3 inter4 i.winner_voting_groups i.ideo_bloc i.age_group2 i.gender i.jewish i.college_educ religiosity_all_01 if survey_num==1, r 
/* the CT X 'Winner' i/e coef. is .0199738; p-value= 0.771*/
/* coef among "losers" (Netanyahu bloc voters): -.3167962 [95% CI: -.4213205; -.2122719]; p-value= 0.000 */
lincom CT_scale+inter
/* coef among "winners" ("Change" bloc voters): -.2968224 [95% CI: -.3826643; -.2109805]; p-value= 0.000 */

* Model 2 - September 2022
reg trust_election_results_01 CT_scale _Iwinner_vo_2 inter inter2 inter3 inter4 i.voting_group i.ideo_bloc i.age_group2 i.gender i.jewish i.college_educ religiosity_all_01 if survey_num==2, r 
/* the CT X 'Winner' i/e coef. is .0587785; p-value= 0.318*/
/* coef among "losers" (Netanyahu bloc voters): -.4068328 [95% CI: -.4981886; -.3154769]; p-value= 0.000 */
lincom CT_scale+inter
/* coef among "winners" ("Change" bloc voters): -.3480543 [95% CI: -.4189129; -.2771957]; p-value= 0.000 */

* Model 3 - October 2022
reg trust_election_results_01 CT_scale _Iwinner_vo_2 inter inter2 inter3 inter4 i.voting_group i.ideo_bloc i.age_group2 i.gender i.jewish i.college_educ religiosity_all_01 if survey_num==3, r 
/* the CT X 'Winner' i/e coef. is .0601289; p-value= 0.363*/
/* coef among "losers" (Netanyahu bloc voters): -.3908197 [95% CI: -.4972227; -.2844167]; p-value= 0.000 */
lincom CT_scale+inter
/* coef among "winners" ("Change" bloc voters): -.3306908 [95% CI: -.4059953; -.2553864]; p-value= 0.000 */

* Model 4 - December 2022
reg trust_election_results_01 CT_scale _Iwinner_vo_2 inter inter2 inter3 inter4 i.voting_group i.ideo_bloc i.age_group2 i.gender i.jewish i.college_educ religiosity_all_01 if survey_num==4, r 
/* the CT X 'Winner' i/e coef. is -.1385428; p-value= 0.031*/
/* coef among "winners" (Netanyahu bloc voters): -.204428 [95% CI: -.2854801; -.1233759]; p-value= 0.000 */
lincom CT_scale+inter
/* coef among "losers" ("Change" bloc voters): -.3429708 [95% CI: -.4395006; -.246441]; p-value= 0.000 */

reg trust_election_results_01 CT_scale _Iwinner_vo_2 inter inter2 inter3 inter4 i.winner_voting_groups i.ideo_bloc i.age_group2 i.gender i.jewish i.college_educ religiosity_all_01 i.survey_num, r 
/* the CT X 'winner' i/e coef. is .0561371; p-value= 0.079*/
/* coef among losers: -.3580942 [95% CI: -.4075603; -.308628]; p-value= 0.000 */
lincom CT_scale+inter
/* coef among winners: -.3019571 [95% CI: -.3407966; -.2631176]; p-value= 0.000 */

drop _Iwinner_vo_2- inter4




**************************************
** Analyses for the Online Appendix **
**************************************

*** Section A: sample characteristics ***
bysort survey_num: sum age
bysort survey_num: tab gender
bysort survey_num: tab jewish
bysort survey_num: tab college_educ
bysort survey_num: tab ideo_bloc




*** Section C: 'dominance' analyses ***

xi: reg trust_election_results_01 CT_scale i.voting_group i.ideo_bloc i.age_group2 i.gender i.jewish i.college_educ religiosity_all if survey_num==1

** Table C1: 'dominance' analyses **

* Model 1 - April 2022
*domin trust_election_results_01 CT_scale _Ivoting_gr_2 _Ivoting_gr_3 _Ivoting_gr_4 _Ivoting_gr_5 _Iideo_bloc_2 _Iideo_bloc_3 _Iage_group_2 _Iage_group_3 _Iage_group_4 _Igender_1 _Ijewish_1 _Icollege_e_1 religiosity_all_01 if survey_num==1, reg(regress) fitstat(e(r2))  
domin trust_election_results_01 CT_scale _Ivoting_gr_2 _Ivoting_gr_3 _Ivoting_gr_4 _Ivoting_gr_5 _Iideo_bloc_2 _Iideo_bloc_3 _Iage_group_2 _Iage_group_3 _Iage_group_4 _Igender_1 _Ijewish_1 _Icollege_e_1 religiosity_all_01 if survey_num==1, reg(regress) epsilon

* Model 2 - September 2022
*domin trust_election_results_01 CT_scale _Ivoting_gr_2 _Ivoting_gr_3 _Ivoting_gr_4 _Ivoting_gr_5 _Iideo_bloc_2 _Iideo_bloc_3 _Iage_group_2 _Iage_group_3 _Iage_group_4 _Igender_1 _Ijewish_1 _Icollege_e_1  religiosity_all_01 if survey_num==2, reg(regress) fitstat(e(r2)) 
domin trust_election_results_01 CT_scale _Ivoting_gr_2 _Ivoting_gr_3 _Ivoting_gr_4 _Ivoting_gr_5 _Iideo_bloc_2 _Iideo_bloc_3 _Iage_group_2 _Iage_group_3 _Iage_group_4 _Igender_1 _Ijewish_1 _Icollege_e_1 religiosity_all_01 if survey_num==2, reg(regress) epsilon

* Model 3 - October 2022
*domin trust_election_results_01 CT_scale _Ivoting_gr_2 _Ivoting_gr_3 _Ivoting_gr_4 _Ivoting_gr_5 _Iideo_bloc_2 _Iideo_bloc_3 _Iage_group_2 _Iage_group_3 _Iage_group_4 _Igender_1 _Ijewish_1 _Icollege_e_1 religiosity_all_01 if survey_num==3, reg(regress) fitstat(e(r2)) 
domin trust_election_results_01 CT_scale _Ivoting_gr_2 _Ivoting_gr_3 _Ivoting_gr_4 _Ivoting_gr_5 _Iideo_bloc_2 _Iideo_bloc_3 _Iage_group_2 _Iage_group_3 _Iage_group_4 _Igender_1 _Ijewish_1 _Icollege_e_1 religiosity_all_01 if survey_num==3, reg(regress) epsilon

* Model 4 - December 2022
*domin trust_election_results_01 CT_scale _Ivoting_gr_2 _Ivoting_gr_3 _Ivoting_gr_4 _Ivoting_gr_5 _Iideo_bloc_2 _Iideo_bloc_3 _Iage_group_2 _Iage_group_3 _Iage_group_4 _Igender_1 _Ijewish_1 _Icollege_e_1 religiosity_all_01 if survey_num==4, reg(regress) fitstat(e(r2)) 
domin trust_election_results_01 CT_scale _Ivoting_gr_2 _Ivoting_gr_3 _Ivoting_gr_4 _Ivoting_gr_5 _Iideo_bloc_2 _Iideo_bloc_3 _Iage_group_2 _Iage_group_3 _Iage_group_4 _Igender_1 _Ijewish_1 _Icollege_e_1 religiosity_all_01 if survey_num==4, reg(regress) epsilon 

* Model 5 - All four surveys combined
*domin trust_election_results_01 CT_scale _Ivoting_gr_2 _Ivoting_gr_3 _Ivoting_gr_4 _Ivoting_gr_5 _Iideo_bloc_2 _Iideo_bloc_3 _Iage_group_2 _Iage_group_3 _Iage_group_4 _Igender_1 _Ijewish_1 _Icollege_e_1 religiosity_all_01, reg(regress) fitstat(e(r2)) 
domin trust_election_results_01 CT_scale _Ivoting_gr_2 _Ivoting_gr_3 _Ivoting_gr_4 _Ivoting_gr_5 _Iideo_bloc_2 _Iideo_bloc_3 _Iage_group_2 _Iage_group_3 _Iage_group_4 _Igender_1 _Ijewish_1 _Icollege_e_1 religiosity_all_01, reg(regress) epsilon

drop _Ivoting_gr_2-_Icollege_e_1




*** Section D: Robustness tests ***

** Table D1: Ordered logistic ("ordinal") regression **
* Model 1 - April 2022
ologit trust_election_results CT_scale i.voting_group i.ideo_bloc i.age_group2 i.gender i.jewish i.college_educ religiosity_all_01 if survey_num==1, r
outreg2 using TableD1.doc, replace se dec(2) alpha (.001, .01, .05) symbol (***, **, *)

* Model 2 - September 2022
ologit trust_election_results CT_scale i.voting_group i.ideo_bloc i.age_group2 i.gender i.jewish i.college_educ religiosity_all_01 if survey_num==2, r
outreg2 using TableD1.doc, append se dec(2) alpha (.001, .01, .05) symbol (***, **, *)

* Model 3 - October 2022
ologit trust_election_results CT_scale i.voting_group i.ideo_bloc i.age_group2 i.gender i.jewish i.college_educ religiosity_all_01 if survey_num==3, r
outreg2 using TableD1.doc, append se dec(2) alpha (.001, .01, .05) symbol (***, **, *)

* Model 4 - December 2022
ologit trust_election_results CT_scale i.voting_group i.ideo_bloc i.age_group2 i.gender i.jewish i.college_educ religiosity_all_01 if survey_num==4, r
outreg2 using TableD1.doc, append se dec(2) alpha (.001, .01, .05) symbol (***, **, *) 

* Model 5 - All four surveys combined
ologit trust_election_results CT_scale i.voting_group i.ideo_bloc i.age_group2 i.gender i.jewish i.college_educ religiosity_all_01 i.survey_num, r
outreg2 using TableD1.doc, append se dec(2) alpha (.001, .01, .05) symbol (***, **, *) 
*margin, atmeans at(CT_scale= (0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1)) /*predict(outcome(4)) */ /*predict(outcome(1))*/
*marginsplot



** Table D2: with political interest/following the news (in three surveys) **
gen follows_news_01=(follows_news-1)/4
sum follows_news_01
* Model 1 - April 2022
reg trust_election_results_01 CT_scale i.voting_group i.ideo_bloc i.age_group2 i.gender i.jewish i.college_educ religiosity_all_01 follows_news_01 if survey_num==1, r
outreg2 using TableD2.doc, replace se dec(2) alpha (.001, .01, .05) symbol (***, **, *)

* Model 2 - September 2022
reg trust_election_results_01 CT_scale i.voting_group i.ideo_bloc i.age_group2 i.gender i.jewish i.college_educ religiosity_all_01 follows_news_01 if survey_num==2, r
outreg2 using TableD2.doc, append se dec(2) alpha (.001, .01, .05) symbol (***, **, *)

* Model 3 - October 2022
reg trust_election_results_01 CT_scale i.voting_group i.ideo_bloc i.age_group2 i.gender i.jewish i.college_educ religiosity_all_01 follows_news_01 if survey_num==3, r
outreg2 using TableD2.doc, append se dec(2) alpha (.001, .01, .05) symbol (***, **, *)

* Model 4 - All three surveys combined
reg trust_election_results_01 CT_scale i.voting_group i.ideo_bloc i.age_group2 i.gender i.jewish i.college_educ religiosity_all_01 follows_news_01 i.survey_num, r
outreg2 using TableD2.doc, append se dec(2) alpha (.001, .01, .05) symbol (***, **, *)

drop follows_news_01



** Table D3: With controls for a populist attitude (December 2022 survey)
recode POP_LAYPEOPLE_ATTI (6=.)
pwcorr CT_scale POP_LAYPEOPLE_ATTI, sig
gen POP_LAYPEOPLE_ATTI_01=(POP_LAYPEOPLE_ATTI-1)/4
sum POP_LAYPEOPLE_ATTI_01

* Model 1 - December 2022 - without controlling for a populist attitude
reg trust_election_results_01 CT_scale i.voting_group i.ideo_bloc i.age_group2 i.gender i.jewish i.college_educ religiosity_all_01 if survey_num==4, r
outreg2 using TableD3.doc, replace se dec(2) alpha (.001, .01, .05) symbol (***, **, *)

* Model 2 - December 2022 - with that control and without the CT scale
reg trust_election_results_01 i.voting_group i.ideo_bloc i.age_group2 i.gender i.jewish i.college_educ religiosity_all_01 POP_LAYPEOPLE_ATTI_01 if survey_num==4, r
outreg2 using TableD3.doc, append se dec(2) alpha (.001, .01, .05) symbol (***, **, *)

* Model 3 - December 2022 - with that control and the CT scale
reg trust_election_results_01 CT_scale i.voting_group i.ideo_bloc i.age_group2 i.gender i.jewish i.college_educ religiosity_all_01 POP_LAYPEOPLE_ATTI_01 if survey_num==4, r
outreg2 using TableD3.doc, append se dec(2) alpha (.001, .01, .05) symbol (***, **, *)



** Table D4 - Winner/loser interactions (the full models of Figure 1 in main text) **

* Model 1 - April 2022
reg trust_election_results_01 c.CT_scale##i.winner_voting_groups i.ideo_bloc i.age_group2 i.gender i.jewish i.college_educ religiosity_all_01 if survey_num==1, r
outreg2 using TableD4.doc, replace se dec(2) alpha (.001, .01, .05) symbol (***, **, *)

* Model 2 - September 2022
reg trust_election_results_01 c.CT_scale##i.winner_voting_groups i.ideo_bloc i.age_group2 i.gender i.jewish i.college_educ religiosity_all_01 if survey_num==2, r
outreg2 using TableD4.doc, append se dec(2) alpha (.001, .01, .05) symbol (***, **, *)

* Model 3 - October 2022
reg trust_election_results_01 c.CT_scale##i.winner_voting_groups i.ideo_bloc i.age_group2 i.gender i.jewish i.college_educ religiosity_all_01 if survey_num==3, r
outreg2 using TableD4.doc, append se dec(2) alpha (.001, .01, .05) symbol (***, **, *)

* Model 4 - December 2022
reg trust_election_results_01 c.CT_scale##i.winner_voting_groups i.ideo_bloc i.age_group2 i.gender i.jewish i.college_educ religiosity_all_01 if survey_num==4, r
outreg2 using TableD4.doc, append se dec(2) alpha (.001, .01, .05) symbol (***, **, *)

* Model 5 - combining the datasets
reg trust_election_results_01 c.CT_scale##i.winner_voting_groups i.ideo_bloc i.age_group2 i.gender i.jewish i.college_educ religiosity_all_01 i.survey_num, r
outreg2 using TableD4.doc, append se dec(2) alpha (.001, .01, .05) symbol (***, **, *)




*** Section E: Predicting the Conspiracy Thinking scale ***

* Model 1 - April 2022
reg CT_scale i.voting_group i.ideo_bloc i.age_group2 i.gender i.jewish i.college_educ religiosity_all_01 if survey_num==1, r
outreg2 using TableE1.doc, replace se dec(2) alpha (.001, .01, .05) symbol (***, **, *)

* Model 2 - September 2022
reg CT_scale i.voting_group i.ideo_bloc i.age_group2 i.gender i.jewish i.college_educ religiosity_all_01 if survey_num==2, r
outreg2 using TableE1.doc, append se dec(2) alpha (.001, .01, .05) symbol (***, **, *)

* Model 3 - October 2022
reg CT_scale i.voting_group i.ideo_bloc i.age_group2 i.gender i.jewish i.college_educ religiosity_all_01 if survey_num==3, r
outreg2 using TableE1.doc, append se dec(2) alpha (.001, .01, .05) symbol (***, **, *)

* Model 4 - December 2022
reg CT_scale i.voting_group i.ideo_bloc i.age_group2 i.gender i.jewish i.college_educ religiosity_all_01 if survey_num==4, r
outreg2 using TableE1.doc, append se dec(2) alpha (.001, .01, .05) symbol (***, **, *)

* Model 5 - All four surveys combined
reg CT_scale i.voting_group i.ideo_bloc i.age_group2 i.gender i.jewish i.college_educ religiosity_all_01 i.survey_num, r
outreg2 using TableE1.doc, append se dec(2) alpha (.001, .01, .05) symbol (***, **, *)

